//
//  HTTPClient.h
//  王雷Sinoweibo
//
//  Created by wanglei on 16/12/2.
//  Copyright © 2016年 wanglei. All rights reserved.
//

#import <AFNetworking/AFNetworking.h>
#import <Foundation/Foundation.h>
//extern 表示对外公开这些常量,他有两部分组成,包括.h文件里的和.m文件里的
extern NSString *const domain;
//注意enum的命名里面的值必须用NSInteger类型,这样才不会报错
typedef NS_ENUM(NSInteger,HTTPMethods){
  GET = 0, //正常的初始状态
  POST = 1 << 0//准备刷新的状态
};

typedef void (^finished)(NSDictionary *dict,NSError *error);

@interface HTTPClient : AFHTTPSessionManager

+(instancetype)sharedClient;
- (void)requestJSONDict:(HTTPMethods *)method urlstring:(NSString *)urlstring parameters:(NSDictionary *)parameters finished:(finished)isfinished;
@end
